Optimal. Leaf size=616 \[ \frac {x^4}{4 a^2}-\frac {i b^3 x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}+\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {i b^3 x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {b^2 \log \left (b+a \sin \left (c+d x^2\right )\right )}{2 a^2 \left (a^2-b^2\right ) d^2}-\frac {b^3 \text {PolyLog}\left (2,\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d^2}+\frac {b \text {PolyLog}\left (2,\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {b^3 \text {PolyLog}\left (2,\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d^2}-\frac {b \text {PolyLog}\left (2,\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}-\frac {b^2 x^2 \cos \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \sin \left (c+d x^2\right )\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.81, antiderivative size = 616, normalized size of antiderivative = 1.00, number of steps
used = 22, number of rules used = 10, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.556, Rules used = {4290, 4276,
3405, 3404, 2296, 2221, 2317, 2438, 2747, 31} \begin {gather*} \frac {b \text {Li}_2\left (\frac {i a e^{i \left (d x^2+c\right )}}{b-\sqrt {b^2-a^2}}\right )}{a^2 d^2 \sqrt {b^2-a^2}}-\frac {b \text {Li}_2\left (\frac {i a e^{i \left (d x^2+c\right )}}{b+\sqrt {b^2-a^2}}\right )}{a^2 d^2 \sqrt {b^2-a^2}}+\frac {b^2 \log \left (a \sin \left (c+d x^2\right )+b\right )}{2 a^2 d^2 \left (a^2-b^2\right )}+\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {b^2-a^2}}\right )}{a^2 d \sqrt {b^2-a^2}}-\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{\sqrt {b^2-a^2}+b}\right )}{a^2 d \sqrt {b^2-a^2}}-\frac {b^2 x^2 \cos \left (c+d x^2\right )}{2 a d \left (a^2-b^2\right ) \left (a \sin \left (c+d x^2\right )+b\right )}-\frac {b^3 \text {Li}_2\left (\frac {i a e^{i \left (d x^2+c\right )}}{b-\sqrt {b^2-a^2}}\right )}{2 a^2 d^2 \left (b^2-a^2\right )^{3/2}}+\frac {b^3 \text {Li}_2\left (\frac {i a e^{i \left (d x^2+c\right )}}{b+\sqrt {b^2-a^2}}\right )}{2 a^2 d^2 \left (b^2-a^2\right )^{3/2}}-\frac {i b^3 x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {b^2-a^2}}\right )}{2 a^2 d \left (b^2-a^2\right )^{3/2}}+\frac {i b^3 x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{\sqrt {b^2-a^2}+b}\right )}{2 a^2 d \left (b^2-a^2\right )^{3/2}}+\frac {x^4}{4 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2221
Rule 2296
Rule 2317
Rule 2438
Rule 2747
Rule 3404
Rule 3405
Rule 4276
Rule 4290
Rubi steps
\begin {align*} \int \frac {x^3}{\left (a+b \csc \left (c+d x^2\right )\right )^2} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {x}{(a+b \csc (c+d x))^2} \, dx,x,x^2\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \left (\frac {x}{a^2}+\frac {b^2 x}{a^2 (b+a \sin (c+d x))^2}-\frac {2 b x}{a^2 (b+a \sin (c+d x))}\right ) \, dx,x,x^2\right )\\ &=\frac {x^4}{4 a^2}-\frac {b \text {Subst}\left (\int \frac {x}{b+a \sin (c+d x)} \, dx,x,x^2\right )}{a^2}+\frac {b^2 \text {Subst}\left (\int \frac {x}{(b+a \sin (c+d x))^2} \, dx,x,x^2\right )}{2 a^2}\\ &=\frac {x^4}{4 a^2}-\frac {b^2 x^2 \cos \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \sin \left (c+d x^2\right )\right )}-\frac {(2 b) \text {Subst}\left (\int \frac {e^{i (c+d x)} x}{i a+2 b e^{i (c+d x)}-i a e^{2 i (c+d x)}} \, dx,x,x^2\right )}{a^2}-\frac {b^3 \text {Subst}\left (\int \frac {x}{b+a \sin (c+d x)} \, dx,x,x^2\right )}{2 a^2 \left (a^2-b^2\right )}+\frac {b^2 \text {Subst}\left (\int \frac {\cos (c+d x)}{b+a \sin (c+d x)} \, dx,x,x^2\right )}{2 a \left (a^2-b^2\right ) d}\\ &=\frac {x^4}{4 a^2}-\frac {b^2 x^2 \cos \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \sin \left (c+d x^2\right )\right )}-\frac {b^3 \text {Subst}\left (\int \frac {e^{i (c+d x)} x}{i a+2 b e^{i (c+d x)}-i a e^{2 i (c+d x)}} \, dx,x,x^2\right )}{a^2 \left (a^2-b^2\right )}+\frac {(2 i b) \text {Subst}\left (\int \frac {e^{i (c+d x)} x}{2 b-2 \sqrt {-a^2+b^2}-2 i a e^{i (c+d x)}} \, dx,x,x^2\right )}{a \sqrt {-a^2+b^2}}-\frac {(2 i b) \text {Subst}\left (\int \frac {e^{i (c+d x)} x}{2 b+2 \sqrt {-a^2+b^2}-2 i a e^{i (c+d x)}} \, dx,x,x^2\right )}{a \sqrt {-a^2+b^2}}+\frac {b^2 \text {Subst}\left (\int \frac {1}{b+x} \, dx,x,a \sin \left (c+d x^2\right )\right )}{2 a^2 \left (a^2-b^2\right ) d^2}\\ &=\frac {x^4}{4 a^2}+\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}-\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {b^2 \log \left (b+a \sin \left (c+d x^2\right )\right )}{2 a^2 \left (a^2-b^2\right ) d^2}-\frac {b^2 x^2 \cos \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \sin \left (c+d x^2\right )\right )}-\frac {\left (i b^3\right ) \text {Subst}\left (\int \frac {e^{i (c+d x)} x}{2 b-2 \sqrt {-a^2+b^2}-2 i a e^{i (c+d x)}} \, dx,x,x^2\right )}{a \left (-a^2+b^2\right )^{3/2}}+\frac {\left (i b^3\right ) \text {Subst}\left (\int \frac {e^{i (c+d x)} x}{2 b+2 \sqrt {-a^2+b^2}-2 i a e^{i (c+d x)}} \, dx,x,x^2\right )}{a \left (-a^2+b^2\right )^{3/2}}-\frac {(i b) \text {Subst}\left (\int \log \left (1-\frac {2 i a e^{i (c+d x)}}{2 b-2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {(i b) \text {Subst}\left (\int \log \left (1-\frac {2 i a e^{i (c+d x)}}{2 b+2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{a^2 \sqrt {-a^2+b^2} d}\\ &=\frac {x^4}{4 a^2}-\frac {i b^3 x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}+\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {i b^3 x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {b^2 \log \left (b+a \sin \left (c+d x^2\right )\right )}{2 a^2 \left (a^2-b^2\right ) d^2}-\frac {b^2 x^2 \cos \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \sin \left (c+d x^2\right )\right )}-\frac {b \text {Subst}\left (\int \frac {\log \left (1-\frac {2 i a x}{2 b-2 \sqrt {-a^2+b^2}}\right )}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {b \text {Subst}\left (\int \frac {\log \left (1-\frac {2 i a x}{2 b+2 \sqrt {-a^2+b^2}}\right )}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {\left (i b^3\right ) \text {Subst}\left (\int \log \left (1-\frac {2 i a e^{i (c+d x)}}{2 b-2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {\left (i b^3\right ) \text {Subst}\left (\int \log \left (1-\frac {2 i a e^{i (c+d x)}}{2 b+2 \sqrt {-a^2+b^2}}\right ) \, dx,x,x^2\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}\\ &=\frac {x^4}{4 a^2}-\frac {i b^3 x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}+\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {i b^3 x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {b^2 \log \left (b+a \sin \left (c+d x^2\right )\right )}{2 a^2 \left (a^2-b^2\right ) d^2}+\frac {b \text {Li}_2\left (\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}-\frac {b \text {Li}_2\left (\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}-\frac {b^2 x^2 \cos \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \sin \left (c+d x^2\right )\right )}+\frac {b^3 \text {Subst}\left (\int \frac {\log \left (1-\frac {2 i a x}{2 b-2 \sqrt {-a^2+b^2}}\right )}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d^2}-\frac {b^3 \text {Subst}\left (\int \frac {\log \left (1-\frac {2 i a x}{2 b+2 \sqrt {-a^2+b^2}}\right )}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d^2}\\ &=\frac {x^4}{4 a^2}-\frac {i b^3 x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}+\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {i b^3 x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d}-\frac {i b x^2 \log \left (1-\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d}+\frac {b^2 \log \left (b+a \sin \left (c+d x^2\right )\right )}{2 a^2 \left (a^2-b^2\right ) d^2}-\frac {b^3 \text {Li}_2\left (\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d^2}+\frac {b \text {Li}_2\left (\frac {i a e^{i \left (c+d x^2\right )}}{b-\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}+\frac {b^3 \text {Li}_2\left (\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{2 a^2 \left (-a^2+b^2\right )^{3/2} d^2}-\frac {b \text {Li}_2\left (\frac {i a e^{i \left (c+d x^2\right )}}{b+\sqrt {-a^2+b^2}}\right )}{a^2 \sqrt {-a^2+b^2} d^2}-\frac {b^2 x^2 \cos \left (c+d x^2\right )}{2 a \left (a^2-b^2\right ) d \left (b+a \sin \left (c+d x^2\right )\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(2446\) vs. \(2(616)=1232\).
time = 15.45, size = 2446, normalized size = 3.97 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.07, size = 0, normalized size = 0.00 \[\int \frac {x^{3}}{\left (a +b \csc \left (d \,x^{2}+c \right )\right )^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 1906 vs. \(2 (526) = 1052\).
time = 4.59, size = 1906, normalized size = 3.09 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{3}}{\left (a + b \csc {\left (c + d x^{2} \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x^3}{{\left (a+\frac {b}{\sin \left (d\,x^2+c\right )}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________